$(function () {
    var salary_datagrid = $("#salary_datagrid");
    salary_datagrid.datagrid({
        url:'/salary/query.do',
        fit:true,
        striped:true,
        fitColumns:true,
        columns:[
            [
                {field:'dept',title:'部门',width:100,align:'center',formatter:function (value) {
                        return value ? value.name:""}},
                {field:'name',title:'姓名',align:'center',width:100},
                {field:'jopNumber',title:'工号',align:'center',width:100},
                {field:'title',title:'职务',width:100,align:'center',formatter:function (value) {
                        return value ? value.name:""}},
                {field:'education',title:'学历',width:100,align:'center',formatter:function (value) {
                        return value ? value.name:""}},
                {field:'salary',title:'基本工资',align:'center',width:100},
                {field:'bouns',title:'奖金',align:'center',width:100},
                {field:'deductMoney',title:'扣款',align:'center',width:100},
                {field:'realSalary',title:'应发工资',align:'center',width:100},
                {field:'insurance',title:'社保',align:'center',width:100},
                {field:'funds',title:'公积金',align:'center',width:100},
                {field:'bankCardNumber',title:'银行卡号',align:'center',width:100},
            ]
        ],
        pagination:true,
        rownumbers:true,
        singleSelect:true,
    });
})
function query1() {
    var jopNumber = $("#jopNumber").textbox('getValue');
    var date = $("#date").textbox('getValue');
    var titleId = $("#titleId").combobox('getValue');
    var deptId = $("#deptId").combobox('getValue');
    var name = $("#name").textbox('getValue');
    var eduId = $("#eduId").combobox('getValue');
    $("#salary_datagrid").datagrid('reload',{
        jopNumber:jopNumber,
        date:date,
        titleId:titleId,
        deptId:deptId,
        name:name,
        eduId:eduId,
    })
}